package com.testfileupload.uploadimg.design.iterator.define;

import java.util.Vector;

public class ConcreateAggregate implements Aggregate {
    //容纳对象的容器
    private Vector vector = new Vector();

    @Override
    public void add(Object o) {
        this.vector.add(o);
    }

    @Override
    public void remove(Object o) {
        this.vector.remove(o);
    }

    @Override
    public Iterator iterator() {
        ConcreateIterator concreateIterator = new ConcreateIterator(this.vector);
        return concreateIterator;
    }
}
